// 引入axios请求
import { ajax } from '@/utils/request'

// 员工详情信息请求
export const reqGetEmployeeList = params => {
  return ajax({
    url: '/sys/user',
    params
  })
}
// 删除员工请求
export const delEmployee = id => {
  return ajax({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}
// 新增员工请求
export const addEmployee = data => {
  return ajax({
    url: '/sys/user',
    method: 'POST',
    data
  })
}
// 根据id获员工详情
export const getUserDetailById = id => {
  return ajax({
    url: `/sys/user/${id}`
  })
}
//  根据id更新员工详情
export const saveUserDetailById = data => {
  return ajax({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
